    package com.ningxun.pagent.web.controller.protocol;

    import com.ningxun.pagent.bus.controller.BaseProtocolController;
    import com.ningxun.pagent.bus.domain.BaseProtocol;
    import com.ningxun.pagent.bus.service.IBaseProtocolService;
    import com.ningxun.pagent.common.core.domain.AjaxResult;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.web.bind.annotation.GetMapping;
    import org.springframework.web.bind.annotation.PathVariable;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RestController;

    import java.util.List;

    import static com.ningxun.pagent.common.core.domain.AjaxResult.success;

    @RestController
    @RequestMapping("wechat/protocol")
    public class WechatProtocolController {

        @Autowired
        private IBaseProtocolService baseProtocolService;

        @GetMapping("/selectByType/{protocolType}")
        public AjaxResult selectByProtocolType(@PathVariable("protocolType") String protocolType) {
            List<BaseProtocol> protocols = baseProtocolService.selectProtocolByType(protocolType);
            return AjaxResult.success(protocols);
        }
    }
